//
//  JBWError.h
//  JBWDSK
//
//  Created by 崔志伟 on 2018/8/3.
//  Copyright © 2018年 崔志伟. All rights reserved.
//

#import <Foundation/Foundation.h>


typedef NS_ENUM(NSInteger,JBWErrorCode) {
    JBWErrorUnknown = 0,
    JBWErrorInitedFail =1,
    JBWErrorLoginFail =2,
    JBWErrorLogoutFail =3,
    JBWErrorEnterGameFail = 4,
    JBWErrorQuitGameFail = 5,
    JBWErrorLevelupFail = 6,
    
    // network
    JBWErrorNetworkException = 7,
    JBWErrorServerException = 8,
    JBWErrorServerDataException = 9,
    
    // pay order
    JBWErrorPayOrderFail = 10,
    JBWErrorPayOrderCancel = 11,
    JBWErrorPayOrderTransactionFailed = 12,
    JBWErrorPayOrderProductNoexist = 13,
    JBWErrorPaySandboxError = 10001,
    
    JBWErrorNoLogined = 14,
    
};

@interface JBWError : NSError
+ (instancetype _Nullable )errorWithCode:(NSInteger)code;

+ (instancetype _Nullable )errorWithCode:(NSInteger)code userInfo:(nullable NSDictionary *)dict;
@end
